home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MACD 5
/
MACD 5.bin
/
workbench
/
libs
/
queue.lzh
/
queue_3.1
/
queue_library.h
< prev
next >
Wrap
C/C++ Source or Header
|
1996-11-28
|
2KB
|
82 lines
/*
queue_library.h --- queue library internals.
Copyright (c) 1995 SHW Wabnitz
Written by Bernhard Fastenrath (fasten@shw.com)
This file may be distributed under the terms
of the GNU General Public License.
*/
#include <exec/types.h>
#include <exec/lists.h>
#include <exec/nodes.h>
#include <exec/memory.h>
#include <dos/dos.h>
#include <dos/dosextens.h>
#include <dos/filehandler.h>
#include <proto/exec.h>
#include <proto/dos.h>
#include <stdlib.h>
#include <string.h>
#include "queue.h"
#if !defined (__AROS__) /* for p-OS and AmigaOS */
#ifndef MEMF_PRIVATE
#define MEMF_PRIVATE 0
#endif
#ifndef MEMF_SHARED_READ
#define MEMF_SHARED_READ 0
#endif
#endif /* __AROS__ */
typedef struct List List;
typedef struct Node Node;
typedef struct MinNode MinNode;
typedef struct MsgPort MsgPort;
typedef struct Message Message;
typedef struct SignalSemaphore Semaphore;
typedef struct Task Task;
typedef struct {
Node qn_Node;
List qn_List;
ULONG qn_Refs;
ULONG qn_Read;
List qn_Handles;
Semaphore qn_Semaphore;
} QueueNode;
/* bitmasks for qm_Status */
#define QMS_ACTIVE 0x01
#define QMS_INACTIVE 0x02
#define QMS_REMOVED ( QMS_INACTIVE | 0x04 )
#define QMS_MARKER ( QMS_INACTIVE | 0x08 )
typedef struct {
MinNode qh_MinNode;
USHORT qh_Mode;
USHORT qh_Pad;
QueueNode *qh_QNode;
ULONG qh_SigMask;
Task *qh_SigTask;
union {
struct {
QMessage *qhl_Message;
MinNode qhl_MinNode; /* same as qm_MinNode */
USHORT qhl_Status; /* same as qm_Status */
USHORT qhl_Pad;
} qhl;
struct {
List qhs_ReplyList;
ULONG qhs_MsgCount;
} qhs;
} qh_un;
} QueueHandle;